/**
 * PHOSIDE: PHosphorylation Site IDentification Engine.
 * Copyright 2009 Digital Biology Lab, University of Missouri.
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation; either version 3 of the License, or (at your option) any later
 * version. <p/> This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more
 * details.
 */

package phoside.io.fasta.parser;

import phoside.io.fasta.parser.DefaultHeaderRule;

import phoside.util.StaticFinalValues;

/**
 *
 * @author gjj
 */
public class DefaultPhosphoHeaderRule
                extends DefaultHeaderRule
                implements PhosphoHeaderRule {

    protected String sitesDelimitor;

//    public DefaultPhosphoHeaderRule() {
//        super();
//    }

    public DefaultPhosphoHeaderRule(final String accRegEx) {
        super(accRegEx);
    }

    public DefaultPhosphoHeaderRule(final String accRegEx,
            final String symbolRegEx, final String descRegEx,
            final String speciesRegEx, final String sitesRegEx,
            final String sitesDelimitor) {
        super(accRegEx, symbolRegEx, descRegEx, speciesRegEx);

        if (sitesRegEx==null || sitesDelimitor==null) {
            throw new NullPointerException();
        }

        this.setSitesRegEx(sitesRegEx);
        this.setSitesDelimitor(sitesDelimitor);
    }

    public String getSitesRegEx() {
        return getFieldRegEx(StaticFinalValues.SITES);
    }

    public String getSitesDelimitor() {
        return sitesDelimitor;
    }

    protected void setSitesRegEx(final String sitesRegEx) {
        setFieldRegEx(StaticFinalValues.SITES, sitesRegEx);
    }

    protected void setSitesDelimitor(final String sitesDelimitor) {
        if (sitesDelimitor==null) {
            throw new NullPointerException();
        }

        this.sitesDelimitor = sitesDelimitor;
    }
}
